package service;

import domain.OrderResult;
import domain.flower;
import execption.nullValueException;
import execption.repeatValueException;

import java.sql.SQLException;
import java.util.List;
import java.util.Set;

public interface FlowerStoreService {
     /**
      * 商家登录
      * @param storeName
      * @param storePassword
      * @return
      */
     boolean flowerStoreLogin(String storeName ,String storePassword);

     /**
      * 商家查看所有订单
      * @return
      */
     List<OrderResult> orderList();

     /**
      * 商家入库鲜花
      * @param id
      * @param total
      * @return
      * @throws nullValueException
      * @throws SQLException
      */
     boolean InputFlower(int id ,int total) throws nullValueException, SQLException;

     /**
      * 商家鲜花培出库
      * @param id
      * @param total
      * @param flag
      * @return
      * @throws nullValueException
      * @throws SQLException
      */
     boolean InputFlower(int id ,int total ,boolean flag) throws  nullValueException ,SQLException;

     /**
      * 商家培育鲜花;
      * @param f
      * @return
      * @throws repeatValueException
      */
     boolean AddFlowers(flower f) throws repeatValueException;

     /**
      * 商家通过鲜花类型，价格，时间查看订单
      * @param type
      * @param price
      * @param time
      * @param list
      * @return
      */
     public Set<OrderResult> filterOrder(String type , String price , String time , List<OrderResult> list);
}
